#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>

void test(int n, int m)
{
	int a = 0;
	int b = 0;
	int sum = 0;
	int i = 31;
	while (i >= 0)
	{
		if (((n >> i) & 1) != ((m >> i) & 1))
		{
			sum++;
		}
		i--;
	}
	printf("%d\n", sum);
}

int main()
{
	int n = 0;
	int m = 0;
	scanf("%d%d", &n, &m);
	test(n, m);
	main();
	return 0;
}